pluginHome = new File( grailsSettings.projectPluginsDir.path ).listFiles().find { it.name.startsWith('cloud-tools-') }
if(pluginHome == null) pluginHome = "."

includeTargets << new File( "${pluginHome}/scripts/CloudToolsInit.groovy" )

target('default': "Inits LB Pool") {
	initLbPool()
}

target(initLbPool: "The implementation task") {
    depends( initCloudToolsService)
    cloudToolsService.withCluster {clusterManager, clusterName, cluster ->
        cluster.getClusterInstance().getDatabaseTier().initlbpool();
		event('StatusFinal', ['Done with Init LB Pool'])
    }
}
